package week1;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

/**
 * Created with IntelliJ IDEA.
 * User: golubinskyi
 * Date: 31.10.13
 * Time: 18:46
 * To change this template use File | Settings | File Templates.
 */
public class SampleTest2 {
    private static final Logger log = Logger.getLogger(SampleTest2.class);
    public static void main(String[] args) {
        PropertyConfigurator.configure("Students/data/logger.properties");

        log.info("testing starts");
        Sample2 s = new Sample2();
        s.testTrace();
        s.testDebug();
        s.testInfo();
        s.testWarn();
        s.testError();
        s.testFatal();
        try {
            s.thisMayFail();
        } catch (Exception e) {
            //actions
            log.error("Weird thing happened" , e);
        }
        log.info("testing has been ended");
    }
}
